import request from "@/utils/request";

// 查询项目岗位列表
export function listPost(query) {
  return request({
    url: "/cld/post/list",
    method: "get",
    params: query,
  });
}

// 项目管理查看项目岗位
export function getProjectPostList(query) {
  return request({
    url: "/cld/post/getProjectPostList",
    method: "get",
    params: query,
  });
}

// 查询项目岗位详细
export function getPost(projectPostId) {
  return request({
    url: "/cld/post/" + projectPostId,
    method: "get",
  });
}

// 新增项目岗位
export function addPost(data) {
  return request({
    url: "/cld/post",
    method: "post",
    data: data,
  });
}

// 修改项目岗位
export function updatePost(data) {
  return request({
    url: "/cld/post",
    method: "put",
    data: data,
  });
}


// 项目小组 - 修改项目岗位
export function updatePostInfo(data) {
  return request({
    url: "/cld/post/updatePost",
    method: "put",
    data: data,
  });
}

// 项目岗位解绑
export function unbindingPost(data) {
  return request({
    url: "/cld/post/unbinding",
    method: "post",
    data: data,
  });
}

// 删除项目岗位
export function delPost(projectPostId) {
  return request({
    url: "/cld/post/" + projectPostId,
    method: "delete",
  });
}
